<?php

namespace app\logic\single;

use app\logic\model\ConfigLogicModel;

class ConfigSingle
{
    private static $inc;
    /**
     * @var ConfigLogicModel
     */
    private $configModel;

    private function __clone(){

    }
    private function __construct()
    {
        $this->configModel = new ConfigLogicModel();
    }

    public static function getInstance(): ConfigSingle
    {
        if(is_null(self::$inc)){
            self::$inc = new self();
        }
        return self::$inc;
    }

    function getConfig(){
        return $this->configModel->where('id',1)->find()->toArray();
    }
}